﻿namespace CoreEx.Database.Persistence
{
    /// <summary>
    /// Represents a class that is capable of injecting an <see cref="ITrackableBindingList"/> 
    /// instance into a target instance
    /// </summary>
    public interface ITrackableListInjector
    {
        /// <summary>
        /// Injects <see cref="ITrackableBindingList"/> instances into the <paramref name="target"/> instance.
        /// </summary>
        /// <typeparam name="TTarget">The type of target witch has to be a reference type.</typeparam>
        /// <param name="target">The target instance for witch to inject <see cref="ITrackableBindingList"/> instances.</param>
        /// <param name="stateTracker">The <see cref="IStateTracker"/> that will receive notifications when items are 
        /// added to the <see cref="IStateTracker"/> instance</param>
        void Inject<TTarget>(TTarget target, IStateTracker stateTracker) where TTarget : class;
    }
}